<?php

class brooklynvegan_scraper extends BlogScraper
{
    
    function __construct()
    {
        parent::__construct('brooklynvegan');
    }

    function getPostLinks()
    {
        return $this->xpath->query('//h3//a');
    }
        
}

class brooklynvegan_post_scraper extends PostScraper
{
 
    function getDate()
    {
        
        $date = $this->xpath->query("//div[@class='content']//h2")->item(0)->nodeValue;
        echo '<b>'.$date.'</b>';
        list($junk, $date) = explode(' on ', $date, 2);
        return date('Y-m-d H:i:s', strtotime($date));

    }
    
    function getTitle()
    {
        return $this->xpath->query('//h2//a')->item(0)->nodeValue;
    }
    
    function getLink()
    {
        return $this->xpath->query('//h2//a')->item(0)->getAttribute('href');
    }   
}

?>